/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package libsvm;

import java.io.Serializable;

/**
 *
 * @author kiakaku
 */
public class Word implements Serializable{

    public String word;
    public int soLanXuatHienTrong1VanBan = 0; // f
    public double tanSuatTu = 0; // tf = f/ Sum(f)
    public int soVanBanTuXuatHien =0; //df
    public double idf = 0; //idf  = log(N/df) + 1
    public double tfidf = 0; // tifdf = tf *idf

    public Word(String str){
        this.word = str;
    }
    public Word(String word, int soLanXuatHienTrong1VanBan) {
        this.word = word;
        this.soLanXuatHienTrong1VanBan = soLanXuatHienTrong1VanBan;
    }

    public boolean equals(Word obj) {
	return (obj.word.equals(this.word));
    }
}
